﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script>
        var a1 = [1, 2, 3, 4];
        var a2 = [11, 12, 13, 14];
        var a3 = [21, 22, 23, 24];
        var arr = [a1, a2, a3];
        console.log(arr);
        var count = arr[0].length;
        console.log(count);
        var result = [];
        var sum = 0;
        for (var i = 0; i < count; i++) {
            arr.map(function (item, index) {
                sum += item[i];
            });
            result.push(sum);
            sum = 0;
        }
        console.log(result);
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <asp:Button ID="Button1" runat="server" Text="add cookie" OnClick="Button1_Click" />
            <asp:Button ID="Button2" runat="server" Text="remove cookie" OnClick="Button2_Click" />
        </div>
    </form>
</body>
</html>
